const http = require("http");
const fs = require("fs");
let server = http.createServer((req, res) => {
  let url = req.url;
  if (url === "/favicon.ico" || url === "/") {
    res.end("404");
    return;
  }
  console.log(url);
  let str = fs.readFileSync(__dirname + url);

  res.end(str);
});
server.listen(80, () => {
  console.log("开始");
});
